document.onmouseup = function() {
    var selectedText;
    if(document.selection)
        selectedText = document.selection.createRange().text;
    else selectedText = window.getSelection()+'';
    
    if(selectedText){
        //弹出工具栏
        var selectedParentElem = window.getSelection().anchorNode.parentElement;
        popUpToolbar(selectedParentElem);
        // window.getSelection().removeAllRanges();  //移除选择的焦点
    }
}

chrome.runtime.sendMessage({
    // 向background发送消息
    todo: "test"
});

function popUpToolbar(){
    console.log("工具栏");
    
}
